<?php 
$CI =& get_instance();
$CI->load->library("admin/admin_header_lib");
$CI->admin_header_lib->display_header_element(array("script"=>array("jquery-1.4.2","jquery.validate"),"script_withfolder"=>array("ckeditor/ckeditor.js","ckfinder/ckfinder.js")));
$CI->admin_header_lib->display_header();

$CI->load->library('admin/admin_sidebar_lib');
$CI->admin_sidebar_lib->display_sidebar();

?>
<div class="admin_right">
<div class="height7"></div>
<?php 
foreach($query as $row)
{
	$title = $row->staticpage_title;
	$subtitle = $row->staticpage_subtitle;
	$content = $row->staticpage_content;
    $content2 = $row->staticpage_content2;
	$metakey = $row->staticpage_metakey;
	$metadesc = $row->staticpage_metadesc;
	$ids = $row->staticpage_id;
}
$attributes = array('class' => '', 'id' => '');

echo form_open('admin/staticpage/edit/'.$ids, $attributes); ?>
<p>
        <label for="title"><h2 class="head021">Title <span class="required">*</span></h2></label>
        <div class="line"></div>
        <input id="title" type="text" name="title" maxlength="255" size="50" value="<?php echo $title; ?>"  />
		<br /><?php echo form_error('title'); ?>
        
</p>

<div class="height10"></div>
<p>
        <label for="subtitle"><h2 class="head021">Subtitle <span class="required">*</span></h2></label>
        <div class="line"></div>
        <input id="subtitle" type="text" name="subtitle" maxlength="255" size="50" value="<?php echo $subtitle; ?>"  />
        <br /><?php echo form_error('subtitle'); ?>
</p>

<div class="height10"></div>
<p>
        <label for="meta_keyword"><h2 class="head021">Meta Keyword <span class="required">*</span></h2></label>
        <div class="line"></div>
        <?php echo form_textarea( array( 'name' => 'meta_keyword', 'rows' => '3', 'cols' => '70', 'value' => $metakey, 'id' => 'meta_keyword' ) )?>
         <input id="staticpage_id" type="hidden" name="staticpage_id" maxlength="255" size="50" value="<?php echo $ids; ?>"  />
       <br /><?php echo form_error('meta_keyword'); ?>
</p>

<div class="height10"></div>
<p>
        <label for="meta_description"><h2 class="head021">Meta Description <span class="required">*</h2></span></label>
        <div class="line"></div>
        <?php echo form_textarea( array( 'name' => 'meta_description', 'rows' => '3', 'cols' => '70', 'value' => $metadesc, 'id' => 'meta_description' ) )?>
       <br /> <?php echo form_error('meta_description'); ?>
        
</p>


<div class="height10"></div>
<p>
        <label for="content"><h2 class="head021">Content 1 <span class="required">*</span></h2></label>	
        <div class="line"></div>				
	<?php echo form_textarea( array( 'name' => 'content','id' =>'content', 'rows' => '20', 'cols' => '80', 'value' => $content ) )?>
    <script type="text/javascript">
				CKEDITOR.replace( 'content',
								 {
									filebrowserBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html',
									filebrowserImageBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html?type=Images',
									filebrowserFlashBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html?type=Flash',
									filebrowserUploadUrl : 
									   '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Files',
									filebrowserImageUploadUrl : 
									   '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Images',
									filebrowserFlashUploadUrl : '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Flash',
									enterMode: CKEDITOR.ENTER_BR
								 } 
						 ); 
			</script>
			
            <br />
			<?php echo form_error('content'); ?>
</p>
<div class="height10"></div>
<p>
        <label for="content"><h2 class="head021">Content 2 </h2></label>
        <div class="line"></div>					
	<?php echo form_textarea( array( 'name' => 'content2','id' =>'content2', 'rows' => '20', 'cols' => '80', 'value' => $content2 ) )?>
    <script type="text/javascript">
				CKEDITOR.replace( 'content2',
								 {
									filebrowserBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html',
									filebrowserImageBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html?type=Images',
									filebrowserFlashBrowseUrl : '<?php echo base_url()?>ckfinder/ckfinder.html?type=Flash',
									filebrowserUploadUrl : 
									   '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Files',
									filebrowserImageUploadUrl : 
									   '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Images',
									filebrowserFlashUploadUrl : '<?php echo base_url()?>ckfinder/core/connector/cfm/connector.cfm?command=QuickUpload&type=Flash',
									enterMode: CKEDITOR.ENTER_BR
								 } 
						 ); 
			</script>
			
            <br />
			<?php echo form_error('content2'); ?>
</p>

<div class="line"></div>
        <?php echo form_submit( 'submit', 'Submit'); ?>
<div class="line"></div>

<?php echo form_close(); ?>
</div>

<?php //$this->load->view(TEMPLATE_NAME.'/admin/footer');
$CI->load->library('admin/admin_footer_lib');
$CI->admin_footer_lib->display_footer();

?>
